# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer:
pkgname=ssldump
pkgver=1.5
pkgrel=0
pkgdesc="SSLv3/TLS network protocol analyzer"
url="https://github.com/adulau/ssldump"
arch="all"
license="BSD-4-Clause"
subpackages="$pkgname-doc"
options="!check"  # no tests provided
makedepends="autoconf automake libnet-dev json-c-dev fts-dev libpcap-dev openssl-dev"
source="https://github.com/adulau/ssldump/archive/v$pkgver/ssldump-$pkgver.tar.gz
	"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--datarootdir=/usr/share \
		--docdir=/usr/share/doc \
		--localstatedir=/var
	make
}

package() {
	make install sbindir="$pkgdir/usr/sbin" mandir="$pkgdir/usr/share/man" docdir="$pkgdir/usr/share/doc"
	install -D -m 644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
}

sha512sums="
4eb84744591539fdaf9b2454d23c917f5e97cb2e5f03e0c38393327caecc72dfc77ee7b734519b1f224a5e3a132185b8fccfeb9186fc9f1b586444fc748a3814  ssldump-1.5.tar.gz
"
